/**
 * @param {string} password
 * @return {boolean}
 */
var strongPasswordCheckerII = function(password) {
  if(password.length < 8) return false;
  let specialStr = "!@#$%^&*()-+".split('');
  let smAlpha = 0, bgAlpha = 0, numAlpha = 0, specialAlpha = 0;
  for(let i = 0; i < password.length; i++) {
    if(i > 0 && password[i] == password[i - 1]) return false;
    if(password[i] <= 'z' && password[i] >= 'a') smAlpha++;
    if(password[i] <= 'Z' && password[i] >= 'A') bgAlpha++;
    if(password[i] <= '9' && password[i] >= '0') numAlpha++;
    if(specialStr.includes(password[i])) specialAlpha++;
  }
  if (smAlpha && bgAlpha && numAlpha && specialAlpha) return true;
  return false;

};
let password = "IloveLe3tcode!";
console.log(strongPasswordCheckerII(password));
password = "Me+You--IsMyDream";
console.log(strongPasswordCheckerII(password));
password = "1aB!";
console.log(strongPasswordCheckerII(password));
